﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<hercules.Models.PessoaModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Funcionário
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Funcionário</h2>

<p>
    <%: Html.ActionLink("Criar Novo Funcionário", "Create") %>
</p>
<table>
    <thead>
    <tr>
        <th>
            CPF
        </th>
        <th>
            CNPJ
        </th>
        <th>
            Nome
        </th>
        <th>
            Endereço
        </th>
        <th>
            RG
        </th>
        <th>
            CEP
        </th>
        <th>
            Estado
        </th>
        <th>
            Cidade
        </th>
        <th>
            Bairro
        </th>
        <th>
            Email
        </th>
        <th>
            Insc Estadual
        </th>
        <th>
            Banco
        </th>
        <th>
            Conta
        </th>
        <th>
            Agência
        </th>
        <th></th>
    </tr>
    </thead>
    <tbody>
<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.Pessoa.cpf) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Cpf) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Cnpj) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Nome) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Endereco) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Rg) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Cep) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Estado) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Cidade) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Bairro) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Email) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Insc_estadual) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Banco) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Conta) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Agencia) %>
        </td>
        <td>
            <%: Html.ActionLink("Editar", "Edit", new { id=item.IdPessoa }) %> |
            <%: Html.ActionLink("Detalhes", "Details", new { id=item.IdPessoa }) %> |
            <%: Html.ActionLink("Deletar", "Delete", new { id=item.IdPessoa }) %>
        </td>
    </tr>
<% } %>
</tbody>
</table>

</asp:Content>
